package com.spark.incoicings.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.spark.invoicings.entity.PurchaseArrival;
import com.spark.invoicings.utils.Result;

import java.util.List;
import java.util.Map;

public interface PurchaseArrivalService extends IService<PurchaseArrival> {


    /**
     * 根据id获取采购到货单
     * @param id
     * @return
     */
    PurchaseArrival selectPurchaseArrivalById(Integer id);

    /**
     * 根据id删除采购到货单
     * @param id
     * @return
     */
    boolean delPurchaseArrival(Integer id);

    /**
     * 根据采购id更新采购到货单状态
     * @param purchaseArrival
     * @return
     */
    Result updatePurchaseArrivalByOId(PurchaseArrival purchaseArrival);

    /**
     * 根据id更新采购到货单
     * @param purchaseArrival
     * @return
     */
    Result updatePurchaseArrival(PurchaseArrival purchaseArrival);

    /**
     * 添加采购到货单
     * @param purchaseArrival
     * @return
     */
    Result addPurchaseArrival(PurchaseArrival purchaseArrival);

    /**
     * 查询所有采购到货单
     * @param map
     * @return
     */
    List<PurchaseArrival> selectPurchaseArrivalAll(Map<String, Object> map);

}
